<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head>
  <title>cdotc.f</title>
 <meta name="generator" content="emacs 21.3.1; htmlfontify 0.20">
<style type="text/css"><!-- 
body { background: rgb(255, 255, 255);  color: rgb(0, 0, 0);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: none; }
span.default   { background: rgb(255, 255, 255);  color: rgb(0, 0, 0);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: none; }
span.default a { background: rgb(255, 255, 255);  color: rgb(0, 0, 0);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: underline; }
span.comment   { color: rgb(178, 34, 34);  background: rgb(255, 255, 255);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: none; }
span.comment a { color: rgb(178, 34, 34);  background: rgb(255, 255, 255);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: underline; }
 --></style>

 </head>
  <body>

<pre>
      COMPLEX FUNCTION <a name="CDOTC.1"></a><a href="cdotc.f.html#CDOTC.1">CDOTC</a>(N,CX,INCX,CY,INCY)
<span class="comment">*</span><span class="comment">     .. Scalar Arguments ..
</span>      INTEGER INCX,INCY,N
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Array Arguments ..
</span>      COMPLEX CX(*),CY(*)
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Purpose
</span><span class="comment">*</span><span class="comment">  =======
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     forms the dot product of two vectors, conjugating the first
</span><span class="comment">*</span><span class="comment">     vector.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Further Details
</span><span class="comment">*</span><span class="comment">  ===============
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     jack dongarra, linpack,  3/11/78.
</span><span class="comment">*</span><span class="comment">     modified 12/3/93, array(1) declarations changed to array(*)
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     .. Local Scalars ..
</span>      COMPLEX CTEMP
      INTEGER I,IX,IY
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Intrinsic Functions ..
</span>      INTRINSIC CONJG
<span class="comment">*</span><span class="comment">     ..
</span>      CTEMP = (0.0,0.0)
      <a name="CDOTC.29"></a><a href="cdotc.f.html#CDOTC.1">CDOTC</a> = (0.0,0.0)
      IF (N.LE.0) RETURN
      IF (INCX.EQ.1 .AND. INCY.EQ.1) GO TO 20
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">        code for unequal increments or equal increments
</span><span class="comment">*</span><span class="comment">          not equal to 1
</span><span class="comment">*</span><span class="comment">
</span>      IX = 1
      IY = 1
      IF (INCX.LT.0) IX = (-N+1)*INCX + 1
      IF (INCY.LT.0) IY = (-N+1)*INCY + 1
      DO 10 I = 1,N
          CTEMP = CTEMP + CONJG(CX(IX))*CY(IY)
          IX = IX + INCX
          IY = IY + INCY
   10 CONTINUE
      <a name="CDOTC.45"></a><a href="cdotc.f.html#CDOTC.1">CDOTC</a> = CTEMP
      RETURN
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">        code for both increments equal to 1
</span><span class="comment">*</span><span class="comment">
</span>   20 DO 30 I = 1,N
          CTEMP = CTEMP + CONJG(CX(I))*CY(I)
   30 CONTINUE
      <a name="CDOTC.53"></a><a href="cdotc.f.html#CDOTC.1">CDOTC</a> = CTEMP
      RETURN
      END

</pre>

 </body>
</html>
